<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Agile Modbus: /home/runner/work/agile_modbus/agile_modbus/inc/agile_modbus.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Agile Modbus
   &#160;<span id="projectnumber">1.1.4</span>
   </div>
   <div id="projectbrief">Lightweight modbus protocol stack.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('agile__modbus_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">agile_modbus.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="agile__modbus_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gad07c76f52ecac865589bdea79112ccb6">    1</a></span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#ifndef __PKG_AGILE_MODBUS_H</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#define __PKG_AGILE_MODBUS_H</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#ifndef AGILE_MODBUS_USING_RTU</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#define AGILE_MODBUS_USING_RTU 1</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* AGILE_MODBUS_USING_RTU */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#ifndef AGILE_MODBUS_USING_TCP</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#define AGILE_MODBUS_USING_TCP 1</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* AGILE_MODBUS_USING_TCP */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga1bdaa8903987ab20f825c33f3210ca2e">   48</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_READ_COILS               0x01</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#gaf91b7348ee4aecc99d14afaa3e03c02b">   49</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_READ_DISCRETE_INPUTS     0x02</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga51394ef0b9afbc569f7541ab1244f65e">   50</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_READ_HOLDING_REGISTERS   0x03</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga7771198acca215a378463eb13ad040d1">   51</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_READ_INPUT_REGISTERS     0x04</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga4eaf03c1474a3397f847edd94200ec2f">   52</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_WRITE_SINGLE_COIL        0x05</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga3003e1bab9d1b1da61250ec2dae421cd">   53</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_WRITE_SINGLE_REGISTER    0x06</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#gaabbcd5854c34d199f2f707bb3bfb373f">   54</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_READ_EXCEPTION_STATUS    0x07</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga437dc2cfaa22f7cfcafdd1f85b5a6955">   55</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_WRITE_MULTIPLE_COILS     0x0F</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga89ce7e11ea0f593ee6801a0d0dd50f5d">   56</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_WRITE_MULTIPLE_REGISTERS 0x10</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga890fb2bcf11bb6463e3bc20883c06eee">   57</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_REPORT_SLAVE_ID          0x11</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga0ba08a18b715d5dc44b9e8bca79dd149">   58</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_MASK_WRITE_REGISTER      0x16</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="group___modbus___function___codes.html#ga7243db4d3adff479a3d4f2a201ece12a">   59</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_FC_WRITE_AND_READ_REGISTERS 0x17</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#ga6465ef54c2c342da4d0bab3960ed102f">   67</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_VERSION_STRING &quot;AMB_1.1.4&quot;</span> </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#ga224b2d0e89248e2928b13486362e1dc2">   69</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_BROADCAST_ADDRESS 0 </span></div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#ga55e6b64f5c26356198708ce0ee23bb60">   81</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_MAX_READ_BITS  2000</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#gabc9412592af5b13346eda171ba6e4f3c">   82</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_MAX_WRITE_BITS 1968</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#gae197ea0d248e33a49957dd33580eda1c">   99</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_MAX_READ_REGISTERS     125</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#gaa82d47d969c352ebb7d9f005d2616434">  100</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_MAX_WRITE_REGISTERS    123</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#gad0d6ebec0edd26f1eb80db66840f26d0">  101</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_MAX_WR_WRITE_REGISTERS 121</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#gaf4784aefd5c87a17940705d22ffdf457">  102</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_MAX_WR_READ_REGISTERS  125</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#gad48bc178785378db70099637fc648d77">  116</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_MAX_PDU_LENGTH 253</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="group___modbus___constants.html#gac4b27ed9fcc35c7aa76e2a6c21bbf2b6">  130</a></span>&#160;<span class="preprocessor">#define AGILE_MODBUS_MAX_ADU_LENGTH 260</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="keyword">enum</span> {</div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba175253ca676ad5c5791b0afa9d6f20ac">  147</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba175253ca676ad5c5791b0afa9d6f20ac">AGILE_MODBUS_EXCEPTION_ILLEGAL_FUNCTION</a> = 0x01,</div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baf726441ad31971e171a2a25401c60af2">  148</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baf726441ad31971e171a2a25401c60af2">AGILE_MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS</a>,</div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baab1bfcc730df364863e14f7675acbc13">  149</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baab1bfcc730df364863e14f7675acbc13">AGILE_MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE</a>,</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55bae1bb21560582b2a4c509f4ca6b249956">  150</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55bae1bb21560582b2a4c509f4ca6b249956">AGILE_MODBUS_EXCEPTION_SLAVE_OR_SERVER_FAILURE</a>,</div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba33e2240b5812482471e66ae97397825f">  151</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba33e2240b5812482471e66ae97397825f">AGILE_MODBUS_EXCEPTION_ACKNOWLEDGE</a>,</div>
<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba8ffc92d333e20f8eba2463ec277748d1">  152</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba8ffc92d333e20f8eba2463ec277748d1">AGILE_MODBUS_EXCEPTION_SLAVE_OR_SERVER_BUSY</a>,</div>
<div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baff47f16ef50cf30c15983b3181343af6">  153</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baff47f16ef50cf30c15983b3181343af6">AGILE_MODBUS_EXCEPTION_NEGATIVE_ACKNOWLEDGE</a>,</div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55bab0a2def6bc1f4bced8c82da1ddf146da">  154</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55bab0a2def6bc1f4bced8c82da1ddf146da">AGILE_MODBUS_EXCEPTION_MEMORY_PARITY</a>,</div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba9888b4565cba5b54042d3bd469abc7d8">  155</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba9888b4565cba5b54042d3bd469abc7d8">AGILE_MODBUS_EXCEPTION_NOT_DEFINED</a>,</div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba0ed56108402939a0c6f181c1d639205d">  156</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba0ed56108402939a0c6f181c1d639205d">AGILE_MODBUS_EXCEPTION_GATEWAY_PATH</a>,</div>
<div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba2f8205e4b63716964c6bbf7deadd4949">  157</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba2f8205e4b63716964c6bbf7deadd4949">AGILE_MODBUS_EXCEPTION_GATEWAY_TARGET</a>,</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba14cb4b03d87baae67e83b3bfea7f64b2">AGILE_MODBUS_EXCEPTION_UNKNOW</a> = 0xff</div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba14cb4b03d87baae67e83b3bfea7f64b2">  159</a></span>&#160;};</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#ga88d4f826eda73ae5fc071856f70683fd">  164</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga88d4f826eda73ae5fc071856f70683fdab0a15fe132d3f733ee4052ea2f0bd391">  165</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga88d4f826eda73ae5fc071856f70683fdab0a15fe132d3f733ee4052ea2f0bd391">AGILE_MODBUS_BACKEND_TYPE_RTU</a> = 0, </div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gga88d4f826eda73ae5fc071856f70683fdaf4f989f5d3eaf37ca4175e7bd6560714">AGILE_MODBUS_BACKEND_TYPE_TCP</a>      </div>
<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gga88d4f826eda73ae5fc071856f70683fdaf4f989f5d3eaf37ca4175e7bd6560714">  167</a></span>&#160;} <a class="code" href="group___c_o_m_m_o_n___exported___types.html#ga88d4f826eda73ae5fc071856f70683fd">agile_modbus_backend_type_t</a>;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gaed0f4c33339c8ae9c8730abef9e0f02f">  179</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#ggaed0f4c33339c8ae9c8730abef9e0f02faf9852866360e261fba1cafe87a964b01">  180</a></span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#ggaed0f4c33339c8ae9c8730abef9e0f02faf9852866360e261fba1cafe87a964b01">AGILE_MODBUS_MSG_INDICATION</a>,  </div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <a class="code" href="group___c_o_m_m_o_n___exported___types.html#ggaed0f4c33339c8ae9c8730abef9e0f02fac6dd2ba8a1de6b58ce9ec199d4875da4">AGILE_MODBUS_MSG_CONFIRMATION</a> </div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#ggaed0f4c33339c8ae9c8730abef9e0f02fac6dd2ba8a1de6b58ce9ec199d4875da4">  182</a></span>&#160;} <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gaed0f4c33339c8ae9c8730abef9e0f02f">agile_modbus_msg_type_t</a>;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160; </div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="structagile__modbus__sft.html">  187</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structagile__modbus__sft.html">agile_modbus_sft</a> {</div>
<div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="structagile__modbus__sft.html#ab9ada92752df1ac2d7597a43eb1cd374">  188</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__sft.html#ab9ada92752df1ac2d7597a43eb1cd374">slave</a>;    </div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="structagile__modbus__sft.html#afe1918bcff8e86066656a68de876b873">  189</a></span>&#160;    <span class="keywordtype">int</span> <span class="keyword">function</span>; </div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="structagile__modbus__sft.html#aea219d53ef291aa545de54ed04ecc639">  190</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__sft.html#aea219d53ef291aa545de54ed04ecc639">t_id</a>;     </div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#gaa551bce4815f2889224102ac08f779ad">  191</a></span>&#160;} <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gaa551bce4815f2889224102ac08f779ad">agile_modbus_sft_t</a>;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structagile__modbus.html">agile_modbus</a> <a class="code" href="structagile__modbus.html">agile_modbus_t</a>; </div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html">  198</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structagile__modbus__backend.html">agile_modbus_backend</a> {</div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#acf381dc049072a82c7c858e042a72cae">  199</a></span>&#160;    uint32_t <a class="code" href="structagile__modbus__backend.html#acf381dc049072a82c7c858e042a72cae">backend_type</a>;                            </div>
<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#ac0af65e29883654439fa2ee3832dcd5e">  200</a></span>&#160;    uint32_t <a class="code" href="structagile__modbus__backend.html#ac0af65e29883654439fa2ee3832dcd5e">header_length</a>;                           </div>
<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#af249a707d3885f5fbcd47b444c28a298">  201</a></span>&#160;    uint32_t <a class="code" href="structagile__modbus__backend.html#af249a707d3885f5fbcd47b444c28a298">checksum_length</a>;                         </div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#a992fc2f989ae287cc1dd24ab18de88f3">  202</a></span>&#160;    uint32_t <a class="code" href="structagile__modbus__backend.html#a992fc2f989ae287cc1dd24ab18de88f3">max_adu_length</a>;                          </div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#a8d3409b195ea47bd306bcf502dd022a9">  203</a></span>&#160;    int (*<a class="code" href="structagile__modbus__backend.html#a8d3409b195ea47bd306bcf502dd022a9">set_slave</a>)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> slave); </div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#af1c930c538d90281d83ed4c9cc18f1ac">  204</a></span>&#160;    int (*<a class="code" href="structagile__modbus__backend.html#af1c930c538d90281d83ed4c9cc18f1ac">build_request_basis</a>)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> <span class="keyword">function</span>, <span class="keywordtype">int</span> addr,</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                               <span class="keywordtype">int</span> nb, uint8_t *req);                                </div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#a9cf149ef36ca2b44e5b1b45e061f2860">  206</a></span>&#160;    int (*<a class="code" href="structagile__modbus__backend.html#a9cf149ef36ca2b44e5b1b45e061f2860">build_response_basis</a>)(<a class="code" href="structagile__modbus__sft.html">agile_modbus_sft_t</a> *sft, uint8_t *rsp);              </div>
<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#ae604a6f4cd8f8102f737671b1911320a">  207</a></span>&#160;    int (*<a class="code" href="structagile__modbus__backend.html#ae604a6f4cd8f8102f737671b1911320a">prepare_response_tid</a>)(<span class="keyword">const</span> uint8_t *req, <span class="keywordtype">int</span> *req_length);                </div>
<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#ae22c3d64197febe904d592895705d07b">  208</a></span>&#160;    int (*<a class="code" href="structagile__modbus__backend.html#ae22c3d64197febe904d592895705d07b">send_msg_pre</a>)(uint8_t *req, <span class="keywordtype">int</span> req_length);                               </div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#a5b5d593afcd73504dd8b0977173dcb16">  209</a></span>&#160;    int (*<a class="code" href="structagile__modbus__backend.html#a5b5d593afcd73504dd8b0977173dcb16">check_integrity</a>)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, uint8_t *msg, <span class="keyword">const</span> <span class="keywordtype">int</span> msg_length); </div>
<div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="structagile__modbus__backend.html#a9b202def5092468ba9f8ea59f81b2bc3">  210</a></span>&#160;    int (*<a class="code" href="structagile__modbus__backend.html#a9b202def5092468ba9f8ea59f81b2bc3">pre_check_confirmation</a>)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keyword">const</span> uint8_t *req,</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;                                  <span class="keyword">const</span> uint8_t *rsp, <span class="keywordtype">int</span> rsp_length); </div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="group___c_o_m_m_o_n___exported___types.html#ga3de0b082d8d88e159d162bcf78ef123c">  212</a></span>&#160;} <a class="code" href="group___c_o_m_m_o_n___exported___types.html#ga3de0b082d8d88e159d162bcf78ef123c">agile_modbus_backend_t</a>;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160; </div>
<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="structagile__modbus.html">  217</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structagile__modbus.html">agile_modbus</a> {</div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="structagile__modbus.html#acd02aacf2081b397ee378e21858b2dd7">  218</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structagile__modbus.html#acd02aacf2081b397ee378e21858b2dd7">slave</a>;         </div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="structagile__modbus.html#a7ab3e38c7f75daba9d3ea33ddc41d69e">  219</a></span>&#160;    uint8_t *<a class="code" href="structagile__modbus.html#a7ab3e38c7f75daba9d3ea33ddc41d69e">send_buf</a>; </div>
<div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="structagile__modbus.html#a5ca6f195fce50ce2152bef4f54fc4c8a">  220</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structagile__modbus.html#a5ca6f195fce50ce2152bef4f54fc4c8a">send_bufsz</a>;    </div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="structagile__modbus.html#a7ae0e70e10647b910250928d8b15bc17">  221</a></span>&#160;    uint8_t *<a class="code" href="structagile__modbus.html#a7ae0e70e10647b910250928d8b15bc17">read_buf</a>; </div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="structagile__modbus.html#ad3d742a082530ee2dc6b55c04d80d9a2">  222</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structagile__modbus.html#ad3d742a082530ee2dc6b55c04d80d9a2">read_bufsz</a>;    </div>
<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="structagile__modbus.html#a374a8fa6bbae7c8c7c26fa0327d86c28">  223</a></span>&#160;    uint8_t (*<a class="code" href="structagile__modbus.html#a374a8fa6bbae7c8c7c26fa0327d86c28">compute_meta_length_after_function</a>)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> <span class="keyword">function</span>,</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                                                  <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gaed0f4c33339c8ae9c8730abef9e0f02f">agile_modbus_msg_type_t</a> msg_type); </div>
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="structagile__modbus.html#a01a1cc40593d0b2f35c4bd9264024023">  225</a></span>&#160;    int (*<a class="code" href="structagile__modbus.html#a01a1cc40593d0b2f35c4bd9264024023">compute_data_length_after_meta</a>)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, uint8_t *msg,</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;                                          <span class="keywordtype">int</span> msg_length, <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gaed0f4c33339c8ae9c8730abef9e0f02f">agile_modbus_msg_type_t</a> msg_type); </div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="structagile__modbus.html#aa9d48739d05877966b473beeb61176b7">  227</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="structagile__modbus__backend.html">agile_modbus_backend_t</a> *<a class="code" href="structagile__modbus.html#aa9d48739d05877966b473beeb61176b7">backend</a>;                                                   </div>
<div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="structagile__modbus.html#ae1ab077d16f51a6dbaaa5e3136cf6053">  228</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structagile__modbus.html#ae1ab077d16f51a6dbaaa5e3136cf6053">backend_data</a>;                                                                      </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;};</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160; </div>
<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="structagile__modbus__slave__info.html">  246</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structagile__modbus__slave__info.html">agile_modbus_slave_info</a> {</div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="structagile__modbus__slave__info.html#a5849130126a5393b1d9249b208ff876d">  247</a></span>&#160;    <a class="code" href="structagile__modbus__sft.html">agile_modbus_sft_t</a> *<a class="code" href="structagile__modbus__slave__info.html#a5849130126a5393b1d9249b208ff876d">sft</a>; </div>
<div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="structagile__modbus__slave__info.html#aceba4a7afd2625d76b1aac132d0a758a">  248</a></span>&#160;    <span class="keywordtype">int</span> *<a class="code" href="structagile__modbus__slave__info.html#aceba4a7afd2625d76b1aac132d0a758a">rsp_length</a>;         </div>
<div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="structagile__modbus__slave__info.html#a9e347581c0d5f0c54bd8aaf2ef920e00">  249</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#a9e347581c0d5f0c54bd8aaf2ef920e00">address</a>;             </div>
<div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">  250</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">nb</a>;                  </div>
<div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="structagile__modbus__slave__info.html#a148c813b04073bf06d19fa0478c7b6f6">  251</a></span>&#160;    uint8_t *<a class="code" href="structagile__modbus__slave__info.html#a148c813b04073bf06d19fa0478c7b6f6">buf</a>;            </div>
<div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="structagile__modbus__slave__info.html#a253994beaf696aba4542f7c30e0946cb">  252</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#a253994beaf696aba4542f7c30e0946cb">send_index</a>;          </div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;};</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160; </div>
<div class="line"><a name="l00265"></a><span class="lineno"><a class="line" href="group___slave___exported___types.html#gae66e6077fe07d589d91121ac8874541a">  265</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="group___slave___exported___types.html#gae66e6077fe07d589d91121ac8874541a">agile_modbus_slave_callback_t</a>)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keyword">struct </span><a class="code" href="structagile__modbus__slave__info.html">agile_modbus_slave_info</a> *slave_info, <span class="keyword">const</span> <span class="keywordtype">void</span> *data);</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160; </div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___c_o_m_m_o_n___exported___functions.html#ga520bd6e5aa1521ebe24a058f8bc9e6f5">agile_modbus_common_init</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, uint8_t *send_buf, <span class="keywordtype">int</span> send_bufsz, uint8_t *read_buf, <span class="keywordtype">int</span> read_bufsz);</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___c_o_m_m_o_n___exported___functions.html#ga6e2698caaa0b25e3d2fb00bba81594f7">agile_modbus_set_slave</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> slave);</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___c_o_m_m_o_n___exported___functions.html#gac87efdacacabbaaa2d8ed74904b36f49">agile_modbus_set_compute_meta_length_after_function_cb</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx,</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;                                                            uint8_t (*cb)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> <span class="keyword">function</span>,</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;                                                                          <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gaed0f4c33339c8ae9c8730abef9e0f02f">agile_modbus_msg_type_t</a> msg_type));</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___c_o_m_m_o_n___exported___functions.html#ga1d9466fb449c30600896fb7d59709eef">agile_modbus_set_compute_data_length_after_meta_cb</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx,</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;                                                        <span class="keywordtype">int</span> (*cb)(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, uint8_t *msg,</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;                                                                  <span class="keywordtype">int</span> msg_length, <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gaed0f4c33339c8ae9c8730abef9e0f02f">agile_modbus_msg_type_t</a> msg_type));</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___c_o_m_m_o_n___exported___functions.html#ga5339847285ffab01ff36fe7203d3cb74">agile_modbus_receive_judge</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length, <a class="code" href="group___c_o_m_m_o_n___exported___types.html#gaed0f4c33339c8ae9c8730abef9e0f02f">agile_modbus_msg_type_t</a> msg_type);</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga5d43985cad3f09f0d6596760b941edbc">agile_modbus_serialize_read_bits</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">nb</a>);</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga7908f73260d9afeba6ac2b571f163a97">agile_modbus_deserialize_read_bits</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length, uint8_t *dest);</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#gaf7de4137539de1bed2e607e846f415c2">agile_modbus_serialize_read_input_bits</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">nb</a>);</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga4124e9e8e7048da83855cb92ee7f6e63">agile_modbus_deserialize_read_input_bits</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length, uint8_t *dest);</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga3d6724cd3f77e007cd2f6672e7beb3f8">agile_modbus_serialize_read_registers</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">nb</a>);</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#gadcc32581d649bf2cef5eee596bd67c6f">agile_modbus_deserialize_read_registers</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length, uint16_t *dest);</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#gad1c9ec6c01a6ea61ddbf5c7977b1d1ca">agile_modbus_serialize_read_input_registers</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">nb</a>);</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga73504a775e6c4686d65987278599b3cf">agile_modbus_deserialize_read_input_registers</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length, uint16_t *dest);</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga8a8154791b050691e15eb4ae7da97574">agile_modbus_serialize_write_bit</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, <span class="keywordtype">int</span> status);</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga311e3dec8ebbcd502aebe99c6c964638">agile_modbus_deserialize_write_bit</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length);</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga134947aa1eba3f64d26844f4c8bf57cb">agile_modbus_serialize_write_register</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, <span class="keyword">const</span> uint16_t value);</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga8c566ab6fae153760cc24a18e0210fff">agile_modbus_deserialize_write_register</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length);</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga4620bc2594720eba79a9c9ffa76d3796">agile_modbus_serialize_write_bits</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">nb</a>, <span class="keyword">const</span> uint8_t *src);</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#gabd1613828b12acc5ecf56a7bd4f9e9d1">agile_modbus_deserialize_write_bits</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length);</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga5d763faf3f10ea0e48d799f4eac27857">agile_modbus_serialize_write_registers</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, <span class="keywordtype">int</span> <a class="code" href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">nb</a>, <span class="keyword">const</span> uint16_t *src);</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga2dc807ba747675d754e8095ab7dfb39f">agile_modbus_deserialize_write_registers</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length);</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga9553eb261f886f650b8c207a442b3787">agile_modbus_serialize_mask_write_register</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> addr, uint16_t and_mask, uint16_t or_mask);</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga2bd3952a30caed034f553123d822e9f0">agile_modbus_deserialize_mask_write_register</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length);</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga1404336e09246d48a72dd8ed6ff958be">agile_modbus_serialize_write_and_read_registers</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx,</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;                                                    <span class="keywordtype">int</span> write_addr, <span class="keywordtype">int</span> write_nb,</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;                                                    <span class="keyword">const</span> uint16_t *src,</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;                                                    <span class="keywordtype">int</span> read_addr, <span class="keywordtype">int</span> read_nb);</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga16f67b00a3a19f98ee69b2cce4b61d4e">agile_modbus_deserialize_write_and_read_registers</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length, uint16_t *dest);</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#gaeeb30388d6a90405340ab42f22412946">agile_modbus_serialize_report_slave_id</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx);</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___common___operation___functions.html#ga63e99beaa9aa8350bbe2746bd8c123a1">agile_modbus_deserialize_report_slave_id</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length, <span class="keywordtype">int</span> max_dest, uint8_t *dest);</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___raw___operation___functions.html#ga393dc963d2fac3a2677e8b5f465e187a">agile_modbus_compute_response_length_from_request</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, uint8_t *req);</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___raw___operation___functions.html#ga933c935a47f59cac74bcec545d266a4e">agile_modbus_serialize_raw_request</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keyword">const</span> uint8_t *raw_req, <span class="keywordtype">int</span> raw_req_length);</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___master___raw___operation___functions.html#ga601fca9b16febfb33bb26d780e672fc2">agile_modbus_deserialize_raw_response</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length);</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___slave___operation___functions.html#ga9ddc38e7ac14384c02b07b8927165247">agile_modbus_slave_handle</a>(<a class="code" href="structagile__modbus.html">agile_modbus_t</a> *ctx, <span class="keywordtype">int</span> msg_length, uint8_t slave_strict,</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;                              <a class="code" href="group___slave___exported___types.html#gae66e6077fe07d589d91121ac8874541a">agile_modbus_slave_callback_t</a> slave_cb, <span class="keyword">const</span> <span class="keywordtype">void</span> *slave_data, <span class="keywordtype">int</span> *frame_length);</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___slave___operation___functions.html#gab8a9c04d3fe520c9323600940cf080eb">agile_modbus_slave_io_set</a>(uint8_t *<a class="code" href="structagile__modbus__slave__info.html#a148c813b04073bf06d19fa0478c7b6f6">buf</a>, <span class="keywordtype">int</span> index, <span class="keywordtype">int</span> status);</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;uint8_t <a class="code" href="group___slave___operation___functions.html#gaa5c9135cec09ea8626db054bd3d75227">agile_modbus_slave_io_get</a>(uint8_t *<a class="code" href="structagile__modbus__slave__info.html#a148c813b04073bf06d19fa0478c7b6f6">buf</a>, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___slave___operation___functions.html#gae9ba6989bbe265b05caeba41a28db038">agile_modbus_slave_register_set</a>(uint8_t *<a class="code" href="structagile__modbus__slave__info.html#a148c813b04073bf06d19fa0478c7b6f6">buf</a>, <span class="keywordtype">int</span> index, uint16_t data);</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;uint16_t <a class="code" href="group___slave___operation___functions.html#gac82879249cfa7d8926aa9381a0264a72">agile_modbus_slave_register_get</a>(uint8_t *<a class="code" href="structagile__modbus__slave__info.html#a148c813b04073bf06d19fa0478c7b6f6">buf</a>, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;<span class="comment">/* Include RTU and TCP module */</span></div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;<span class="preprocessor">#if AGILE_MODBUS_USING_RTU</span></div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="agile__modbus__rtu_8h.html">agile_modbus_rtu.h</a>&quot;</span></div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* AGILE_MODBUS_USING_RTU */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160; </div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;<span class="preprocessor">#if AGILE_MODBUS_USING_TCP</span></div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="agile__modbus__tcp_8h.html">agile_modbus_tcp.h</a>&quot;</span></div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* AGILE_MODBUS_USING_TCP */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160; </div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;}</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160; </div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __PKG_AGILE_MODBUS_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aagile__modbus__rtu_8h_html"><div class="ttname"><a href="agile__modbus__rtu_8h.html">agile_modbus_rtu.h</a></div><div class="ttdoc">Agile Modbus package RTU header file.</div></div>
<div class="ttc" id="aagile__modbus__tcp_8h_html"><div class="ttname"><a href="agile__modbus__tcp_8h.html">agile_modbus_tcp.h</a></div><div class="ttdoc">Agile Modbus package TCP header file.</div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___functions_html_ga1d9466fb449c30600896fb7d59709eef"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___functions.html#ga1d9466fb449c30600896fb7d59709eef">agile_modbus_set_compute_data_length_after_meta_cb</a></div><div class="ttdeci">void agile_modbus_set_compute_data_length_after_meta_cb(agile_modbus_t *ctx, int(*cb)(agile_modbus_t *ctx, uint8_t *msg, int msg_length, agile_modbus_msg_type_t msg_type))</div><div class="ttdoc">sets the data length callback function to be received after calculating the data element of the modbu...</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00297">agile_modbus.c:297</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___functions_html_ga520bd6e5aa1521ebe24a058f8bc9e6f5"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___functions.html#ga520bd6e5aa1521ebe24a058f8bc9e6f5">agile_modbus_common_init</a></div><div class="ttdeci">void agile_modbus_common_init(agile_modbus_t *ctx, uint8_t *send_buf, int send_bufsz, uint8_t *read_buf, int read_bufsz)</div><div class="ttdoc">initialize modbus handle</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00257">agile_modbus.c:257</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___functions_html_ga5339847285ffab01ff36fe7203d3cb74"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___functions.html#ga5339847285ffab01ff36fe7203d3cb74">agile_modbus_receive_judge</a></div><div class="ttdeci">int agile_modbus_receive_judge(agile_modbus_t *ctx, int msg_length, agile_modbus_msg_type_t msg_type)</div><div class="ttdoc">Verify the correctness of received data.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00312">agile_modbus.c:312</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___functions_html_ga6e2698caaa0b25e3d2fb00bba81594f7"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___functions.html#ga6e2698caaa0b25e3d2fb00bba81594f7">agile_modbus_set_slave</a></div><div class="ttdeci">int agile_modbus_set_slave(agile_modbus_t *ctx, int slave)</div><div class="ttdoc">set address</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00273">agile_modbus.c:273</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___functions_html_gac87efdacacabbaaa2d8ed74904b36f49"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___functions.html#gac87efdacacabbaaa2d8ed74904b36f49">agile_modbus_set_compute_meta_length_after_function_cb</a></div><div class="ttdeci">void agile_modbus_set_compute_meta_length_after_function_cb(agile_modbus_t *ctx, uint8_t(*cb)(agile_modbus_t *ctx, int function, agile_modbus_msg_type_t msg_type))</div><div class="ttdoc">sets the data element length callback function to be received after calculating the function code of ...</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00284">agile_modbus.c:284</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_ga3de0b082d8d88e159d162bcf78ef123c"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#ga3de0b082d8d88e159d162bcf78ef123c">agile_modbus_backend_t</a></div><div class="ttdeci">struct agile_modbus_backend agile_modbus_backend_t</div><div class="ttdoc">Agile Modbus backend interface structure.</div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_ga88d4f826eda73ae5fc071856f70683fd"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#ga88d4f826eda73ae5fc071856f70683fd">agile_modbus_backend_type_t</a></div><div class="ttdeci">agile_modbus_backend_type_t</div><div class="ttdoc">@ brief Modbus backend type</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00164">agile_modbus.h:164</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gaa551bce4815f2889224102ac08f779ad"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gaa551bce4815f2889224102ac08f779ad">agile_modbus_sft_t</a></div><div class="ttdeci">struct agile_modbus_sft agile_modbus_sft_t</div><div class="ttdoc">contains the modbus header parameter structure</div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gaed0f4c33339c8ae9c8730abef9e0f02f"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gaed0f4c33339c8ae9c8730abef9e0f02f">agile_modbus_msg_type_t</a></div><div class="ttdeci">agile_modbus_msg_type_t</div><div class="ttdoc">Modbus received message type.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00179">agile_modbus.h:179</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55ba0ed56108402939a0c6f181c1d639205d"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba0ed56108402939a0c6f181c1d639205d">AGILE_MODBUS_EXCEPTION_GATEWAY_PATH</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_GATEWAY_PATH</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00156">agile_modbus.h:156</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55ba14cb4b03d87baae67e83b3bfea7f64b2"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba14cb4b03d87baae67e83b3bfea7f64b2">AGILE_MODBUS_EXCEPTION_UNKNOW</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_UNKNOW</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00159">agile_modbus.h:158</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55ba175253ca676ad5c5791b0afa9d6f20ac"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba175253ca676ad5c5791b0afa9d6f20ac">AGILE_MODBUS_EXCEPTION_ILLEGAL_FUNCTION</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_ILLEGAL_FUNCTION</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00147">agile_modbus.h:147</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55ba2f8205e4b63716964c6bbf7deadd4949"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba2f8205e4b63716964c6bbf7deadd4949">AGILE_MODBUS_EXCEPTION_GATEWAY_TARGET</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_GATEWAY_TARGET</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00157">agile_modbus.h:157</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55ba33e2240b5812482471e66ae97397825f"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba33e2240b5812482471e66ae97397825f">AGILE_MODBUS_EXCEPTION_ACKNOWLEDGE</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_ACKNOWLEDGE</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00151">agile_modbus.h:151</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55ba8ffc92d333e20f8eba2463ec277748d1"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba8ffc92d333e20f8eba2463ec277748d1">AGILE_MODBUS_EXCEPTION_SLAVE_OR_SERVER_BUSY</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_SLAVE_OR_SERVER_BUSY</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00152">agile_modbus.h:152</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55ba9888b4565cba5b54042d3bd469abc7d8"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55ba9888b4565cba5b54042d3bd469abc7d8">AGILE_MODBUS_EXCEPTION_NOT_DEFINED</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_NOT_DEFINED</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00155">agile_modbus.h:155</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55baab1bfcc730df364863e14f7675acbc13"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baab1bfcc730df364863e14f7675acbc13">AGILE_MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00149">agile_modbus.h:149</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55bab0a2def6bc1f4bced8c82da1ddf146da"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55bab0a2def6bc1f4bced8c82da1ddf146da">AGILE_MODBUS_EXCEPTION_MEMORY_PARITY</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_MEMORY_PARITY</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00154">agile_modbus.h:154</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55bae1bb21560582b2a4c509f4ca6b249956"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55bae1bb21560582b2a4c509f4ca6b249956">AGILE_MODBUS_EXCEPTION_SLAVE_OR_SERVER_FAILURE</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_SLAVE_OR_SERVER_FAILURE</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00150">agile_modbus.h:150</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55baf726441ad31971e171a2a25401c60af2"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baf726441ad31971e171a2a25401c60af2">AGILE_MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00148">agile_modbus.h:148</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga06fc87d81c62e9abb8790b6e5713c55baff47f16ef50cf30c15983b3181343af6"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga06fc87d81c62e9abb8790b6e5713c55baff47f16ef50cf30c15983b3181343af6">AGILE_MODBUS_EXCEPTION_NEGATIVE_ACKNOWLEDGE</a></div><div class="ttdeci">@ AGILE_MODBUS_EXCEPTION_NEGATIVE_ACKNOWLEDGE</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00153">agile_modbus.h:153</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga88d4f826eda73ae5fc071856f70683fdab0a15fe132d3f733ee4052ea2f0bd391"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga88d4f826eda73ae5fc071856f70683fdab0a15fe132d3f733ee4052ea2f0bd391">AGILE_MODBUS_BACKEND_TYPE_RTU</a></div><div class="ttdeci">@ AGILE_MODBUS_BACKEND_TYPE_RTU</div><div class="ttdoc">RTU.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00165">agile_modbus.h:165</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_gga88d4f826eda73ae5fc071856f70683fdaf4f989f5d3eaf37ca4175e7bd6560714"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#gga88d4f826eda73ae5fc071856f70683fdaf4f989f5d3eaf37ca4175e7bd6560714">AGILE_MODBUS_BACKEND_TYPE_TCP</a></div><div class="ttdeci">@ AGILE_MODBUS_BACKEND_TYPE_TCP</div><div class="ttdoc">TCP.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00167">agile_modbus.h:166</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_ggaed0f4c33339c8ae9c8730abef9e0f02fac6dd2ba8a1de6b58ce9ec199d4875da4"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#ggaed0f4c33339c8ae9c8730abef9e0f02fac6dd2ba8a1de6b58ce9ec199d4875da4">AGILE_MODBUS_MSG_CONFIRMATION</a></div><div class="ttdeci">@ AGILE_MODBUS_MSG_CONFIRMATION</div><div class="ttdoc">Server-side request message.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00182">agile_modbus.h:181</a></div></div>
<div class="ttc" id="agroup___c_o_m_m_o_n___exported___types_html_ggaed0f4c33339c8ae9c8730abef9e0f02faf9852866360e261fba1cafe87a964b01"><div class="ttname"><a href="group___c_o_m_m_o_n___exported___types.html#ggaed0f4c33339c8ae9c8730abef9e0f02faf9852866360e261fba1cafe87a964b01">AGILE_MODBUS_MSG_INDICATION</a></div><div class="ttdeci">@ AGILE_MODBUS_MSG_INDICATION</div><div class="ttdoc">Host-side request message.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00180">agile_modbus.h:180</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga134947aa1eba3f64d26844f4c8bf57cb"><div class="ttname"><a href="group___master___common___operation___functions.html#ga134947aa1eba3f64d26844f4c8bf57cb">agile_modbus_serialize_write_register</a></div><div class="ttdeci">int agile_modbus_serialize_write_register(agile_modbus_t *ctx, int addr, const uint16_t value)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00673">agile_modbus.c:673</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga1404336e09246d48a72dd8ed6ff958be"><div class="ttname"><a href="group___master___common___operation___functions.html#ga1404336e09246d48a72dd8ed6ff958be">agile_modbus_serialize_write_and_read_registers</a></div><div class="ttdeci">int agile_modbus_serialize_write_and_read_registers(agile_modbus_t *ctx, int write_addr, int write_nb, const uint16_t *src, int read_addr, int read_nb)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00852">agile_modbus.c:852</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga16f67b00a3a19f98ee69b2cce4b61d4e"><div class="ttname"><a href="group___master___common___operation___functions.html#ga16f67b00a3a19f98ee69b2cce4b61d4e">agile_modbus_deserialize_write_and_read_registers</a></div><div class="ttdeci">int agile_modbus_deserialize_write_and_read_registers(agile_modbus_t *ctx, int msg_length, uint16_t *dest)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00893">agile_modbus.c:893</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga2bd3952a30caed034f553123d822e9f0"><div class="ttname"><a href="group___master___common___operation___functions.html#ga2bd3952a30caed034f553123d822e9f0">agile_modbus_deserialize_mask_write_register</a></div><div class="ttdeci">int agile_modbus_deserialize_mask_write_register(agile_modbus_t *ctx, int msg_length)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00835">agile_modbus.c:835</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga2dc807ba747675d754e8095ab7dfb39f"><div class="ttname"><a href="group___master___common___operation___functions.html#ga2dc807ba747675d754e8095ab7dfb39f">agile_modbus_deserialize_write_registers</a></div><div class="ttdeci">int agile_modbus_deserialize_write_registers(agile_modbus_t *ctx, int msg_length)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00796">agile_modbus.c:796</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga311e3dec8ebbcd502aebe99c6c964638"><div class="ttname"><a href="group___master___common___operation___functions.html#ga311e3dec8ebbcd502aebe99c6c964638">agile_modbus_deserialize_write_bit</a></div><div class="ttdeci">int agile_modbus_deserialize_write_bit(agile_modbus_t *ctx, int msg_length)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00656">agile_modbus.c:656</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga3d6724cd3f77e007cd2f6672e7beb3f8"><div class="ttname"><a href="group___master___common___operation___functions.html#ga3d6724cd3f77e007cd2f6672e7beb3f8">agile_modbus_serialize_read_registers</a></div><div class="ttdeci">int agile_modbus_serialize_read_registers(agile_modbus_t *ctx, int addr, int nb)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00555">agile_modbus.c:555</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga4124e9e8e7048da83855cb92ee7f6e63"><div class="ttname"><a href="group___master___common___operation___functions.html#ga4124e9e8e7048da83855cb92ee7f6e63">agile_modbus_deserialize_read_input_bits</a></div><div class="ttdeci">int agile_modbus_deserialize_read_input_bits(agile_modbus_t *ctx, int msg_length, uint8_t *dest)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00516">agile_modbus.c:516</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga4620bc2594720eba79a9c9ffa76d3796"><div class="ttname"><a href="group___master___common___operation___functions.html#ga4620bc2594720eba79a9c9ffa76d3796">agile_modbus_serialize_write_bits</a></div><div class="ttdeci">int agile_modbus_serialize_write_bits(agile_modbus_t *ctx, int addr, int nb, const uint8_t *src)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00703">agile_modbus.c:703</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga5d43985cad3f09f0d6596760b941edbc"><div class="ttname"><a href="group___master___common___operation___functions.html#ga5d43985cad3f09f0d6596760b941edbc">agile_modbus_serialize_read_bits</a></div><div class="ttdeci">int agile_modbus_serialize_read_bits(agile_modbus_t *ctx, int addr, int nb)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00445">agile_modbus.c:445</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga5d763faf3f10ea0e48d799f4eac27857"><div class="ttname"><a href="group___master___common___operation___functions.html#ga5d763faf3f10ea0e48d799f4eac27857">agile_modbus_serialize_write_registers</a></div><div class="ttdeci">int agile_modbus_serialize_write_registers(agile_modbus_t *ctx, int addr, int nb, const uint16_t *src)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00765">agile_modbus.c:765</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga63e99beaa9aa8350bbe2746bd8c123a1"><div class="ttname"><a href="group___master___common___operation___functions.html#ga63e99beaa9aa8350bbe2746bd8c123a1">agile_modbus_deserialize_report_slave_id</a></div><div class="ttdeci">int agile_modbus_deserialize_report_slave_id(agile_modbus_t *ctx, int msg_length, int max_dest, uint8_t *dest)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00936">agile_modbus.c:936</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga73504a775e6c4686d65987278599b3cf"><div class="ttname"><a href="group___master___common___operation___functions.html#ga73504a775e6c4686d65987278599b3cf">agile_modbus_deserialize_read_input_registers</a></div><div class="ttdeci">int agile_modbus_deserialize_read_input_registers(agile_modbus_t *ctx, int msg_length, uint16_t *dest)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00615">agile_modbus.c:615</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga7908f73260d9afeba6ac2b571f163a97"><div class="ttname"><a href="group___master___common___operation___functions.html#ga7908f73260d9afeba6ac2b571f163a97">agile_modbus_deserialize_read_bits</a></div><div class="ttdeci">int agile_modbus_deserialize_read_bits(agile_modbus_t *ctx, int msg_length, uint8_t *dest)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00461">agile_modbus.c:461</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga8a8154791b050691e15eb4ae7da97574"><div class="ttname"><a href="group___master___common___operation___functions.html#ga8a8154791b050691e15eb4ae7da97574">agile_modbus_serialize_write_bit</a></div><div class="ttdeci">int agile_modbus_serialize_write_bit(agile_modbus_t *ctx, int addr, int status)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00643">agile_modbus.c:643</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga8c566ab6fae153760cc24a18e0210fff"><div class="ttname"><a href="group___master___common___operation___functions.html#ga8c566ab6fae153760cc24a18e0210fff">agile_modbus_deserialize_write_register</a></div><div class="ttdeci">int agile_modbus_deserialize_write_register(agile_modbus_t *ctx, int msg_length)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00686">agile_modbus.c:686</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_ga9553eb261f886f650b8c207a442b3787"><div class="ttname"><a href="group___master___common___operation___functions.html#ga9553eb261f886f650b8c207a442b3787">agile_modbus_serialize_mask_write_register</a></div><div class="ttdeci">int agile_modbus_serialize_mask_write_register(agile_modbus_t *ctx, int addr, uint16_t and_mask, uint16_t or_mask)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00813">agile_modbus.c:813</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_gabd1613828b12acc5ecf56a7bd4f9e9d1"><div class="ttname"><a href="group___master___common___operation___functions.html#gabd1613828b12acc5ecf56a7bd4f9e9d1">agile_modbus_deserialize_write_bits</a></div><div class="ttdeci">int agile_modbus_deserialize_write_bits(agile_modbus_t *ctx, int msg_length)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00748">agile_modbus.c:748</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_gad1c9ec6c01a6ea61ddbf5c7977b1d1ca"><div class="ttname"><a href="group___master___common___operation___functions.html#gad1c9ec6c01a6ea61ddbf5c7977b1d1ca">agile_modbus_serialize_read_input_registers</a></div><div class="ttdeci">int agile_modbus_serialize_read_input_registers(agile_modbus_t *ctx, int addr, int nb)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00599">agile_modbus.c:599</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_gadcc32581d649bf2cef5eee596bd67c6f"><div class="ttname"><a href="group___master___common___operation___functions.html#gadcc32581d649bf2cef5eee596bd67c6f">agile_modbus_deserialize_read_registers</a></div><div class="ttdeci">int agile_modbus_deserialize_read_registers(agile_modbus_t *ctx, int msg_length, uint16_t *dest)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00571">agile_modbus.c:571</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_gaeeb30388d6a90405340ab42f22412946"><div class="ttname"><a href="group___master___common___operation___functions.html#gaeeb30388d6a90405340ab42f22412946">agile_modbus_serialize_report_slave_id</a></div><div class="ttdeci">int agile_modbus_serialize_report_slave_id(agile_modbus_t *ctx)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00921">agile_modbus.c:921</a></div></div>
<div class="ttc" id="agroup___master___common___operation___functions_html_gaf7de4137539de1bed2e607e846f415c2"><div class="ttname"><a href="group___master___common___operation___functions.html#gaf7de4137539de1bed2e607e846f415c2">agile_modbus_serialize_read_input_bits</a></div><div class="ttdeci">int agile_modbus_serialize_read_input_bits(agile_modbus_t *ctx, int addr, int nb)</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00500">agile_modbus.c:500</a></div></div>
<div class="ttc" id="agroup___master___raw___operation___functions_html_ga393dc963d2fac3a2677e8b5f465e187a"><div class="ttname"><a href="group___master___raw___operation___functions.html#ga393dc963d2fac3a2677e8b5f465e187a">agile_modbus_compute_response_length_from_request</a></div><div class="ttdeci">int agile_modbus_compute_response_length_from_request(agile_modbus_t *ctx, uint8_t *req)</div><div class="ttdoc">Calculate the expected response data length.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l00984">agile_modbus.c:984</a></div></div>
<div class="ttc" id="agroup___master___raw___operation___functions_html_ga601fca9b16febfb33bb26d780e672fc2"><div class="ttname"><a href="group___master___raw___operation___functions.html#ga601fca9b16febfb33bb26d780e672fc2">agile_modbus_deserialize_raw_response</a></div><div class="ttdeci">int agile_modbus_deserialize_raw_response(agile_modbus_t *ctx, int msg_length)</div><div class="ttdoc">parses the original response data</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l01073">agile_modbus.c:1073</a></div></div>
<div class="ttc" id="agroup___master___raw___operation___functions_html_ga933c935a47f59cac74bcec545d266a4e"><div class="ttname"><a href="group___master___raw___operation___functions.html#ga933c935a47f59cac74bcec545d266a4e">agile_modbus_serialize_raw_request</a></div><div class="ttdeci">int agile_modbus_serialize_raw_request(agile_modbus_t *ctx, const uint8_t *raw_req, int raw_req_length)</div><div class="ttdoc">Pack the original data into a request message.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l01031">agile_modbus.c:1031</a></div></div>
<div class="ttc" id="agroup___slave___exported___types_html_gae66e6077fe07d589d91121ac8874541a"><div class="ttname"><a href="group___slave___exported___types.html#gae66e6077fe07d589d91121ac8874541a">agile_modbus_slave_callback_t</a></div><div class="ttdeci">int(* agile_modbus_slave_callback_t)(agile_modbus_t *ctx, struct agile_modbus_slave_info *slave_info, const void *data)</div><div class="ttdoc">Slave callback function.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00265">agile_modbus.h:265</a></div></div>
<div class="ttc" id="agroup___slave___operation___functions_html_ga9ddc38e7ac14384c02b07b8927165247"><div class="ttname"><a href="group___slave___operation___functions.html#ga9ddc38e7ac14384c02b07b8927165247">agile_modbus_slave_handle</a></div><div class="ttdeci">int agile_modbus_slave_handle(agile_modbus_t *ctx, int msg_length, uint8_t slave_strict, agile_modbus_slave_callback_t slave_cb, const void *slave_data, int *frame_length)</div><div class="ttdoc">slave data processing</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l01203">agile_modbus.c:1203</a></div></div>
<div class="ttc" id="agroup___slave___operation___functions_html_gaa5c9135cec09ea8626db054bd3d75227"><div class="ttname"><a href="group___slave___operation___functions.html#gaa5c9135cec09ea8626db054bd3d75227">agile_modbus_slave_io_get</a></div><div class="ttdeci">uint8_t agile_modbus_slave_io_get(uint8_t *buf, int index)</div><div class="ttdoc">Read slave IO status.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l01156">agile_modbus.c:1156</a></div></div>
<div class="ttc" id="agroup___slave___operation___functions_html_gab8a9c04d3fe520c9323600940cf080eb"><div class="ttname"><a href="group___slave___operation___functions.html#gab8a9c04d3fe520c9323600940cf080eb">agile_modbus_slave_io_set</a></div><div class="ttdeci">void agile_modbus_slave_io_set(uint8_t *buf, int index, int status)</div><div class="ttdoc">slave IO settings</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l01139">agile_modbus.c:1139</a></div></div>
<div class="ttc" id="agroup___slave___operation___functions_html_gac82879249cfa7d8926aa9381a0264a72"><div class="ttname"><a href="group___slave___operation___functions.html#gac82879249cfa7d8926aa9381a0264a72">agile_modbus_slave_register_get</a></div><div class="ttdeci">uint16_t agile_modbus_slave_register_get(uint8_t *buf, int index)</div><div class="ttdoc">Read slave register data.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l01184">agile_modbus.c:1184</a></div></div>
<div class="ttc" id="agroup___slave___operation___functions_html_gae9ba6989bbe265b05caeba41a28db038"><div class="ttname"><a href="group___slave___operation___functions.html#gae9ba6989bbe265b05caeba41a28db038">agile_modbus_slave_register_set</a></div><div class="ttdeci">void agile_modbus_slave_register_set(uint8_t *buf, int index, uint16_t data)</div><div class="ttdoc">slave register settings</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8c_source.html#l01172">agile_modbus.c:1172</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html"><div class="ttname"><a href="structagile__modbus__backend.html">agile_modbus_backend</a></div><div class="ttdoc">Agile Modbus backend interface structure.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00198">agile_modbus.h:198</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_a5b5d593afcd73504dd8b0977173dcb16"><div class="ttname"><a href="structagile__modbus__backend.html#a5b5d593afcd73504dd8b0977173dcb16">agile_modbus_backend::check_integrity</a></div><div class="ttdeci">int(* check_integrity)(agile_modbus_t *ctx, uint8_t *msg, const int msg_length)</div><div class="ttdoc">Check the receive data integrity interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00209">agile_modbus.h:209</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_a8d3409b195ea47bd306bcf502dd022a9"><div class="ttname"><a href="structagile__modbus__backend.html#a8d3409b195ea47bd306bcf502dd022a9">agile_modbus_backend::set_slave</a></div><div class="ttdeci">int(* set_slave)(agile_modbus_t *ctx, int slave)</div><div class="ttdoc">Set address interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00203">agile_modbus.h:203</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_a992fc2f989ae287cc1dd24ab18de88f3"><div class="ttname"><a href="structagile__modbus__backend.html#a992fc2f989ae287cc1dd24ab18de88f3">agile_modbus_backend::max_adu_length</a></div><div class="ttdeci">uint32_t max_adu_length</div><div class="ttdoc">Backend ADU length.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00202">agile_modbus.h:202</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_a9b202def5092468ba9f8ea59f81b2bc3"><div class="ttname"><a href="structagile__modbus__backend.html#a9b202def5092468ba9f8ea59f81b2bc3">agile_modbus_backend::pre_check_confirmation</a></div><div class="ttdeci">int(* pre_check_confirmation)(agile_modbus_t *ctx, const uint8_t *req, const uint8_t *rsp, int rsp_length)</div><div class="ttdoc">Pre-check confirmation interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00210">agile_modbus.h:210</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_a9cf149ef36ca2b44e5b1b45e061f2860"><div class="ttname"><a href="structagile__modbus__backend.html#a9cf149ef36ca2b44e5b1b45e061f2860">agile_modbus_backend::build_response_basis</a></div><div class="ttdeci">int(* build_response_basis)(agile_modbus_sft_t *sft, uint8_t *rsp)</div><div class="ttdoc">Build a basic response message interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00206">agile_modbus.h:206</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_ac0af65e29883654439fa2ee3832dcd5e"><div class="ttname"><a href="structagile__modbus__backend.html#ac0af65e29883654439fa2ee3832dcd5e">agile_modbus_backend::header_length</a></div><div class="ttdeci">uint32_t header_length</div><div class="ttdoc">Header length, excluding function code.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00200">agile_modbus.h:200</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_acf381dc049072a82c7c858e042a72cae"><div class="ttname"><a href="structagile__modbus__backend.html#acf381dc049072a82c7c858e042a72cae">agile_modbus_backend::backend_type</a></div><div class="ttdeci">uint32_t backend_type</div><div class="ttdoc">Backend type.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00199">agile_modbus.h:199</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_ae22c3d64197febe904d592895705d07b"><div class="ttname"><a href="structagile__modbus__backend.html#ae22c3d64197febe904d592895705d07b">agile_modbus_backend::send_msg_pre</a></div><div class="ttdeci">int(* send_msg_pre)(uint8_t *req, int req_length)</div><div class="ttdoc">Pre-send data interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00208">agile_modbus.h:208</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_ae604a6f4cd8f8102f737671b1911320a"><div class="ttname"><a href="structagile__modbus__backend.html#ae604a6f4cd8f8102f737671b1911320a">agile_modbus_backend::prepare_response_tid</a></div><div class="ttdeci">int(* prepare_response_tid)(const uint8_t *req, int *req_length)</div><div class="ttdoc">Prepare response interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00207">agile_modbus.h:207</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_af1c930c538d90281d83ed4c9cc18f1ac"><div class="ttname"><a href="structagile__modbus__backend.html#af1c930c538d90281d83ed4c9cc18f1ac">agile_modbus_backend::build_request_basis</a></div><div class="ttdeci">int(* build_request_basis)(agile_modbus_t *ctx, int function, int addr, int nb, uint8_t *req)</div><div class="ttdoc">Build a basic request message interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00204">agile_modbus.h:204</a></div></div>
<div class="ttc" id="astructagile__modbus__backend_html_af249a707d3885f5fbcd47b444c28a298"><div class="ttname"><a href="structagile__modbus__backend.html#af249a707d3885f5fbcd47b444c28a298">agile_modbus_backend::checksum_length</a></div><div class="ttdeci">uint32_t checksum_length</div><div class="ttdoc">Check data length.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00201">agile_modbus.h:201</a></div></div>
<div class="ttc" id="astructagile__modbus__sft_html"><div class="ttname"><a href="structagile__modbus__sft.html">agile_modbus_sft</a></div><div class="ttdoc">contains the modbus header parameter structure</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00187">agile_modbus.h:187</a></div></div>
<div class="ttc" id="astructagile__modbus__sft_html_ab9ada92752df1ac2d7597a43eb1cd374"><div class="ttname"><a href="structagile__modbus__sft.html#ab9ada92752df1ac2d7597a43eb1cd374">agile_modbus_sft::slave</a></div><div class="ttdeci">int slave</div><div class="ttdoc">slave address</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00188">agile_modbus.h:188</a></div></div>
<div class="ttc" id="astructagile__modbus__sft_html_aea219d53ef291aa545de54ed04ecc639"><div class="ttname"><a href="structagile__modbus__sft.html#aea219d53ef291aa545de54ed04ecc639">agile_modbus_sft::t_id</a></div><div class="ttdeci">int t_id</div><div class="ttdoc">Transaction identifier.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00190">agile_modbus.h:190</a></div></div>
<div class="ttc" id="astructagile__modbus__slave__info_html"><div class="ttname"><a href="structagile__modbus__slave__info.html">agile_modbus_slave_info</a></div><div class="ttdoc">Agile Modbus slave information structure.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00246">agile_modbus.h:246</a></div></div>
<div class="ttc" id="astructagile__modbus__slave__info_html_a148c813b04073bf06d19fa0478c7b6f6"><div class="ttname"><a href="structagile__modbus__slave__info.html#a148c813b04073bf06d19fa0478c7b6f6">agile_modbus_slave_info::buf</a></div><div class="ttdeci">uint8_t * buf</div><div class="ttdoc">Data fields required for different function codes.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00251">agile_modbus.h:251</a></div></div>
<div class="ttc" id="astructagile__modbus__slave__info_html_a253994beaf696aba4542f7c30e0946cb"><div class="ttname"><a href="structagile__modbus__slave__info.html#a253994beaf696aba4542f7c30e0946cb">agile_modbus_slave_info::send_index</a></div><div class="ttdeci">int send_index</div><div class="ttdoc">Current index of sending buffer.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00252">agile_modbus.h:252</a></div></div>
<div class="ttc" id="astructagile__modbus__slave__info_html_a5849130126a5393b1d9249b208ff876d"><div class="ttname"><a href="structagile__modbus__slave__info.html#a5849130126a5393b1d9249b208ff876d">agile_modbus_slave_info::sft</a></div><div class="ttdeci">agile_modbus_sft_t * sft</div><div class="ttdoc">sft structure pointer</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00247">agile_modbus.h:247</a></div></div>
<div class="ttc" id="astructagile__modbus__slave__info_html_a9e347581c0d5f0c54bd8aaf2ef920e00"><div class="ttname"><a href="structagile__modbus__slave__info.html#a9e347581c0d5f0c54bd8aaf2ef920e00">agile_modbus_slave_info::address</a></div><div class="ttdeci">int address</div><div class="ttdoc">Register address.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00249">agile_modbus.h:249</a></div></div>
<div class="ttc" id="astructagile__modbus__slave__info_html_aceba4a7afd2625d76b1aac132d0a758a"><div class="ttname"><a href="structagile__modbus__slave__info.html#aceba4a7afd2625d76b1aac132d0a758a">agile_modbus_slave_info::rsp_length</a></div><div class="ttdeci">int * rsp_length</div><div class="ttdoc">Response data length pointer.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00248">agile_modbus.h:248</a></div></div>
<div class="ttc" id="astructagile__modbus__slave__info_html_aeb6268b26910a7839eb1f515c8ad1e4b"><div class="ttname"><a href="structagile__modbus__slave__info.html#aeb6268b26910a7839eb1f515c8ad1e4b">agile_modbus_slave_info::nb</a></div><div class="ttdeci">int nb</div><div class="ttdoc">number</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00250">agile_modbus.h:250</a></div></div>
<div class="ttc" id="astructagile__modbus_html"><div class="ttname"><a href="structagile__modbus.html">agile_modbus</a></div><div class="ttdoc">Agile Modbus structure.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00217">agile_modbus.h:217</a></div></div>
<div class="ttc" id="astructagile__modbus_html_a01a1cc40593d0b2f35c4bd9264024023"><div class="ttname"><a href="structagile__modbus.html#a01a1cc40593d0b2f35c4bd9264024023">agile_modbus::compute_data_length_after_meta</a></div><div class="ttdeci">int(* compute_data_length_after_meta)(agile_modbus_t *ctx, uint8_t *msg, int msg_length, agile_modbus_msg_type_t msg_type)</div><div class="ttdoc">Customized calculation data length interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00225">agile_modbus.h:225</a></div></div>
<div class="ttc" id="astructagile__modbus_html_a374a8fa6bbae7c8c7c26fa0327d86c28"><div class="ttname"><a href="structagile__modbus.html#a374a8fa6bbae7c8c7c26fa0327d86c28">agile_modbus::compute_meta_length_after_function</a></div><div class="ttdeci">uint8_t(* compute_meta_length_after_function)(agile_modbus_t *ctx, int function, agile_modbus_msg_type_t msg_type)</div><div class="ttdoc">Customized calculation data element length interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00223">agile_modbus.h:223</a></div></div>
<div class="ttc" id="astructagile__modbus_html_a5ca6f195fce50ce2152bef4f54fc4c8a"><div class="ttname"><a href="structagile__modbus.html#a5ca6f195fce50ce2152bef4f54fc4c8a">agile_modbus::send_bufsz</a></div><div class="ttdeci">int send_bufsz</div><div class="ttdoc">Send buffer size.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00220">agile_modbus.h:220</a></div></div>
<div class="ttc" id="astructagile__modbus_html_a7ab3e38c7f75daba9d3ea33ddc41d69e"><div class="ttname"><a href="structagile__modbus.html#a7ab3e38c7f75daba9d3ea33ddc41d69e">agile_modbus::send_buf</a></div><div class="ttdeci">uint8_t * send_buf</div><div class="ttdoc">Send buffer.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00219">agile_modbus.h:219</a></div></div>
<div class="ttc" id="astructagile__modbus_html_a7ae0e70e10647b910250928d8b15bc17"><div class="ttname"><a href="structagile__modbus.html#a7ae0e70e10647b910250928d8b15bc17">agile_modbus::read_buf</a></div><div class="ttdeci">uint8_t * read_buf</div><div class="ttdoc">Receive buffer.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00221">agile_modbus.h:221</a></div></div>
<div class="ttc" id="astructagile__modbus_html_aa9d48739d05877966b473beeb61176b7"><div class="ttname"><a href="structagile__modbus.html#aa9d48739d05877966b473beeb61176b7">agile_modbus::backend</a></div><div class="ttdeci">const agile_modbus_backend_t * backend</div><div class="ttdoc">Backend interface.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00227">agile_modbus.h:227</a></div></div>
<div class="ttc" id="astructagile__modbus_html_acd02aacf2081b397ee378e21858b2dd7"><div class="ttname"><a href="structagile__modbus.html#acd02aacf2081b397ee378e21858b2dd7">agile_modbus::slave</a></div><div class="ttdeci">int slave</div><div class="ttdoc">slave address</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00218">agile_modbus.h:218</a></div></div>
<div class="ttc" id="astructagile__modbus_html_ad3d742a082530ee2dc6b55c04d80d9a2"><div class="ttname"><a href="structagile__modbus.html#ad3d742a082530ee2dc6b55c04d80d9a2">agile_modbus::read_bufsz</a></div><div class="ttdeci">int read_bufsz</div><div class="ttdoc">Receive buffer size.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00222">agile_modbus.h:222</a></div></div>
<div class="ttc" id="astructagile__modbus_html_ae1ab077d16f51a6dbaaa5e3136cf6053"><div class="ttname"><a href="structagile__modbus.html#ae1ab077d16f51a6dbaaa5e3136cf6053">agile_modbus::backend_data</a></div><div class="ttdeci">void * backend_data</div><div class="ttdoc">Backend data, pointing to RTU or TCP structure.</div><div class="ttdef"><b>Definition:</b> <a href="agile__modbus_8h_source.html#l00228">agile_modbus.h:228</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_bfccd401955b95cf8c75461437045ac0.html">inc</a></li><li class="navelem"><a class="el" href="agile__modbus_8h.html">agile_modbus.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
